if __name__ == '__main__':
    a = int(input())
    if a<3:
        print(f"{a*10.5}")
    else:
        print(f"{a*4+13}")